﻿<div class="widget widget-table">
    <div class="widget-header">
        <h3><i class="fa fa-table"></i> 收货管理</h3>
    </div>
    <div class="widget-content">
        <div class="row">
            <div class="col-sm-12" style="padding:0 20px 15px 12px;">
                <button type="button" class="btn btn-primary role" data-role="51" style="margin-left:5px;" ng-click="addReceipt();">入库登记</button>
            </div>
            <div class="col-sm-12 search-bar">
                <div class="search-col">
                    <label class="search-label">开始日期：</label>
                    <p class="input-group">
                        <input type="text" class="form-control search-control" style="width:110px;"
                               uib-datepicker-popup
                               ng-model="searchBar.startDate"
                               is-open="searchBar.opened.startDate"
                               show-button-bar="false"
                               ng-click="searchBar.opened.startDate = true" />
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-default" ng-click="searchBar.opened.startDate = true"><i class="fa fa-calendar"></i></button>
                        </span>
                    </p>
                </div>
                <div class="search-col">
                    <label class="search-label">结束日期：</label>
                    <p class="input-group">
                        <input type="text" class="form-control search-control" style="width:110px;"
                               uib-datepicker-popup
                               ng-model="searchBar.endDate"
                               is-open="searchBar.opened.endDate"
                               show-button-bar="false"
                               ng-click="searchBar.opened.endDate = true" />
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-default" ng-click="searchBar.opened.endDate = true"><i class="fa fa-calendar"></i></button>
                        </span>
                    </p>
                </div>
                <div class="clearfix"></div>
                <div class="search-col">
                    <label class="search-label">搜索条目：</label>
                    <select class="form-control search-control" ng-model="searchBar.keywordType">
                        <option value="trackingNumber">运单单号</option>
                        <option value="customerNumber">客户编号</option>
                        <option value="userName">客户账号</option>
                        <option value="receiveIdentity">客户标识</option>
                    </select>
                    <input type="text" class="form-control search-control" style="margin-left:5px; width:480px;" placeholder="请输入查询关键字" ng-model="searchBar.keywords" />
                    <button type="button" class="btn btn-primary" style="margin-left:5px;" ng-click="btnSearch()">搜索</button>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th style="min-width:50px;">序号</th>
                            <th style="min-width:100px;">转运公司</th>
                            <th style="min-width:100px;">转运单号</th>
                            <th style="min-width:100px;">客户编号</th>
                            <th style="min-width:100px;">客户账号</th>
                            <th style="min-width:100px;">客户标识</th>
                            <th style="min-width:100px;">是否转仓</th>
                            <th style="min-width:100px;">填写日期</th>
                            <th style="min-width:50px;">状态</th>
                            <th style="min-width:50px;">订单类型</th>
                            <th style="min-width:100px;">仓库位置</th>
                            <th style="min-width:100px;">入库重量</th>
                            <th style="min-width:100px;">入库时间</th>
                            <th style="min-width:110px;">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="item in dataList">
                            <td>{{item.rownumber}}</td>
                            <td>{{item.carrierName}}</td>
                            <td><a href="javascript:void(0);" ng-click="btnOpenDetail(item,'trackingDetail');">{{item.trackingNumber}}</a></td>
                            <td><a href="javascript:void(0);" ng-click="btnOpenDetail(item,'customerDetail');">{{item.customerNumber}}</a></td>
                            <td>{{item.userName}}</td>
                            <td>{{item.receiveIdentity}}</td>
                            <td>{{item.isTransfer == 0 ? '否' : '是'}}</td>
                            <td>{{item.createDate | date:'MM/dd/yyyy HH:mm:ss'}}</td>
                            <td>{{item._status}}</td>
                            <td class="text-center" style="padding:2px;">
                                <img src="/images/fast-ship.png" title="急速原单" style="width:30px; height:30px;" ng-show="item.isFastShip == 1" />
                            </td>
                            <td>{{item.location}}</td>
                            <td><span ng-show="item.packageWeight != 0">{{item.packageWeight}}</span></td>
                            <td><span ng-show="item.inboundDate != '0000-00-00 00:00:00'">{{item.inboundDate | date:'MM/dd/yyyy HH:mm:ss'}}</span></td>
                            <td>
                                <a href="javascript:void(0);" ng-click="btnOpenDetail(item,'trackingDetail');" ng-show="item.status == 'Intransit'">查看</a>
                                <a href="javascript:void(0);" class="role" data-role="52" ng-click="btnPrint(item);" ng-show="item.status == 'Inbound'">打印入库单</a>
                                <!--<a href="javascript:void(0);" ng-click="btnActions(item,'void')">废弃</a>-->
                                <a href="javascript:void(0);" class="role" data-role="53" ng-click="btnActions(item,'delete')">删除</a>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div class="row">
                    <div class="col-sm-12 text-right">
                        <uib-pagination class="pagination pagination-rewrite pull-right"
                                        boundary-links="true"
                                        max-size="5"
                                        total-items="pagination.totalCount"
                                        items-per-page="pagination.pageSize"
                                        ng-model="pagination.pageIndex"
                                        ng-change="getData()"
                                        previous-text="上一页"
                                        next-text="下一页"
                                        first-text="首页"
                                        last-text="尾页">
                        </uib-pagination>
                        <select class="form-control pull-right" style="width:70px;" ng-model="pagination.pageSize" ng-change="getData()">
                            <option value="10">10</option>
                            <option value="20">20</option>
                            <option value="50">50</option>
                            <option value="100">100</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<print-inbound-package></print-inbound-package>